package com.fsnbigdata.service.impl;

import com.fsnbigdata.domain.ZhHelp;
import com.fsnbigdata.repository.ZhHelpRepository;
import com.fsnbigdata.service.api.ZhHelpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: chen quan zhou
 * @Date: Created in 16:44 2018/9/29
 * @Modified By:
 */
@Service
public class ZhHelpServiceImpl implements ZhHelpService {
    
    @Autowired
    private ZhHelpRepository zhHelpRepository;
    
    @Override
    public ZhHelp findById(Long id,String creator) {
        return zhHelpRepository.findOneByCreator(id,creator);
    }
    
    @Override
    public ZhHelp update(ZhHelp zhHelp) {
        return zhHelpRepository.save(zhHelp);
    }

    @Override
    public ZhHelp findOne(Long id) {
        return zhHelpRepository.findOne(id);
    }
}
